import java.util.Scanner;

//输入三个数，从小到大的方式输出三个数
public class java_3 {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("请输入三个数：");
		int a = in.nextInt();
		int b = in.nextInt();
		int c = in.nextInt();
		int temp = 0;
		if (a > b) {
			temp = a;
			a = b;
			b = temp;
		}
		if (b > c) {
			temp = b;
			b = c;
			c = temp;
		}
		if (a > b) {
			temp = a;
			a = b;
			b = temp;
		}
		System.out.println("从小到大为：" + a + " " + b + " " + c);
//第二种
int max = a > b ? (a > c ? a : c) : (b > c ? b : c);
		int min = a < b ? (a < c ? a : c) : (b < c ? b : c);
		int mid = a > c ? (a < b ? a : b) : (c < b ? c : b);
		System.out.println("从小到大为：" + min + " " + mid + " " + max);

	}
}
